﻿<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<link rel="Bookmark" href="imgs/favicon.ico"/>
	<link rel="Shortcut Icon" href="imgs/favicon.ico"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css"/>
	<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin"/>
	<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css"/>
	<title>商城</title>
</head>
<body>
<!--顶部-->
<header class="navbar-wrapper"></header>
<!--左侧菜单-->
<aside class="Hui-aside">
	<div class="menu_dropdown bk_2" id="leftMenu"></div>
</aside>

<!--首页-->
<section class="Hui-article-box">
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i>
		<a href="" class="maincolor">首页</a>
	</nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<table class="table table-border table-bordered table-bg">
				<thead>
					<tr>
						<th colspan="7" scope="col">最新统计</th>
					</tr>
					<tr class="text-c">
						<th>概览名称</th>
						<th>共计</th>
					</tr>
				</thead>
				<tbody>
					<tr class="text-c">
						<td>用户量</td>
						<td id="userNum">0</td>
					</tr>
					<tr class="text-c">
						<td>零售端商品数</td>
						<td id="scGoodsNum">0</td>
					</tr>
					<tr class="text-c">
						<td>零售端在售商品数</td>
						<td id="scGsaleNum">0</td>
					</tr>
					<tr class="text-c">
						<td>零售端订单数量</td>
						<td id="scOrderNum">0</td>
					</tr>
					<tr class="text-c">
						<td>零售端客户浏览量</td>
						<td id="scVisitNum">0</td>
					</tr>
					<tr class="text-c">
						<td>零售端待付款订单</td>
						<td id="scOrderPaynoNum">0</td>
					</tr>
					<tr class="text-c">
						<td>零售端待发货订单</td>
						<td id="scOrderSendnoNum">0</td>
					</tr>
					<tr class="text-c">
						<td>零售端退款中订单</td>
						<td id="scOrderRefundNum">0</td>
					</tr>
					<tr class="text-c">
						<td>零售端库存预警</td>
						<td id="scStock">0</td>
					</tr>
					<tr class="text-c">
						<td>渠道商申请</td>
						<td id="qdShopAuthNum">0</td>
					</tr>
					<tr class="text-c">
						<td>渠道端商品数</td>
						<td id="qdGoodsNum">0</td>
					</tr>
					<tr class="text-c">
						<td>渠道端在售商品数</td>
						<td id="qdGsaleNum">0</td>
					</tr>
					<tr class="text-c">
						<td>渠道端订单数量</td>
						<td id="qdOrderNum">0</td>
					</tr>
					<tr class="text-c">
						<td>渠道端待付款订单</td>
						<td id="qdOrderPaynoNum">0</td>
					</tr>
					<tr class="text-c">
						<td>渠道端待发货订单</td>
						<td id="qdOrderSendnoNum">0</td>
					</tr>
					<tr class="text-c">
						<td>渠道端退款中订单</td>
						<td id="qdOrderRefundNum">0</td>
					</tr>
					<tr class="text-c">
						<td>渠道端库存预警</td>
						<td id="qdStock">0</td>
					</tr>
				</tbody>
			</table>
		</article>
	</div>
</section>
</body>
</html>


<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.page.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/view.js"></script>
<script type="text/javascript">
	(function () {
		tongji();
	})();
	//获取统计
	function tongji(){
		$.ajax({
			type: apis.tongji.method,
			url: apis.tongji.url,
			data: {},
			success: function (res) {
				console.log(res);
				if (res.code < 0) {
					return
				}
				var d = res.data;
				var h = '';
				$('#userNum').html(d.userNum);
				$('#scGoodsNum').html(d.scGoodsNum);
				$('#scGsaleNum').html(d.scGsaleNum);
				$('#scOrderNum').html(d.scOrderNum);
				$('#scVisitNum').html(d.scVisitNum);
				$('#scOrderPaynoNum').html(d.scOrderPaynoNum);
				$('#scOrderSendnoNum').html(d.scOrderSendnoNum);
				$('#scOrderRefundNum').html(d.scOrderRefundNum);
				if (d.scStock > 0) {
					h = '<b style="color: red;">' + d.scStock + '</b>';
				} else {
					h = 0;
				}
				$('#scStock').html(h);
				if (d.qdStock > 0) {
					h = '<b style="color: red;">' + d.qdStock + '</b>';
				} else {
					h = 0;
				}
				$('#qdStock').html(h);
				$('#qdShopAuthNum').html(d.qdShopAuthNum);
				$('#qdGoodsNum').html(d.qdGoodsNum);
				$('#qdGsaleNum').html(d.qdGsaleNum);
				$('#qdOrderNum').html(d.qdOrderNum);
				$('#qdOrderPaynoNum').html(d.qdOrderPaynoNum);
				$('#qdOrderSendnoNum').html(d.qdOrderSendnoNum);
				$('#qdOrderRefundNum').html(d.qdOrderRefundNum);
			},
			error: function () {
				console.log('错误辣');
			}
		});
	}
</script>